<style>
    .box{
     font-size: 90px;
     color: green;
     margin: 30px auto;
     padding: 30px auto;
    }
 </style>
<body>
    <div class="box" style="width: 100px;height: 200px; background-color: red;">你好啊</div>
    <script>
        var obox = document.getElementsByClassName('box')[0]
        console.log(obox.offsetwidth,obox.offsetheigth)

           offsetheigth;
           offsetheight;
           clientwidth
           clientheight
           
    </script>
</body>